home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gvPhotoSprite, gvMaskSprite, gvOverlaySprite, gvLetterMaskSprite, gvAlphaStripSprite, gvAlphaHiliteBoxSprite, gvHiliteLetterSprite, gvToolBarSprite, gvQuitButtonSprite, gvHelpButtonSprite, gvChgPhotoButton1Sprite, gvChgPhotoButton2Sprite, gvChgPhotoButton3Sprite, gvChgTrackButtonSprite, gvActivity1ButtonSprite, gvActivity2ButtonSprite, gvWordSprite1, gvWordSprite2, gvWordSprite3, gvLabelSprite, gvaPhoto, up, down, right, left, SFX_EXT, MOV_EXT, DIR_SYM, IBM, OVERLAY_DELAY, PHOTO_DELAY, gvfRhymeTrack, gvfPhotoSFX, gvfFromIntro, gvfRealQuit, gvCurLetter, gvTicks, gvRhymeTime, gvcPPButtSounds, gvcSFButtSounds, gvcFFFButtSounds, gvSeekFindLetters, gvPokeProdLetters, gvfDidWhoDoesWhat, gMouseDownTimer
- set the mouseDownScript to EMPTY
- set the mouseUpScript to EMPTY
- set the keyDownScript to EMPTY
- set the timeoutScript to EMPTY
- set up to 0
- set down to 1
- set right to 2
- set left to 3
- set IBM to 256
- if voidp(SFX_EXT) then
- set SFX_EXT to ".AIF"
- end if
- if voidp(MOV_EXT) then
- set MOV_EXT to ".dxr"
- end if
- if the machineType = IBM then
- if voidp(DIR_SYM) then
- set DIR_SYM to "\"
- end if
- setAt(the searchPath, 1, the pathName & "SFX")
- else
- if voidp(DIR_SYM) then
- set DIR_SYM to ":"
- end if
- end if
- set the timer to the lastClick
- set gMouseDownTimer to the lastClick
- set OVERLAY_DELAY to 900
- set PHOTO_DELAY to 150
- set gvcPPButtSounds to 7
- set gvcSFButtSounds to 6
- set gvcFFFButtSounds to 12
- set gvSeekFindLetters to "Y"
- set gvPokeProdLetters to "XZ"
- set gvfDidWhoDoesWhat to 0
- set gvPhotoSprite to 1
- set gvMaskSprite to 2
- set gvOverlaySprite to 3
- set gvWordSprite1 to 4
- set gvWordSprite2 to 5
- set gvWordSprite3 to 6
- set gvLabelSprite to 7
- set gvLetterMaskSprite to 13
- set gvToolBarSprite to 14
- set gvAlphaStripSprite to 15
- set gvAlphaHiliteBoxSprite to 16
- set gvQuitButtonSprite to 17
- set gvChgTrackButtonSprite to 18
- set gvActivity1ButtonSprite to 19
- set gvActivity2ButtonSprite to 20
- set gvChgPhotoButton1Sprite to 21
- set gvChgPhotoButton2Sprite to 22
- set gvChgPhotoButton3Sprite to 23
- set gvHelpButtonSprite to 24
- set gvHiliteLetterSprite to 26
- if the frame = label("Init") then
- if gvfFromIntro then
- set gvfFromIntro to 0
- else
- set gvfRhymeTrack to 1
- end if
- if gvfRhymeTrack then
- set gvRhymeTime to OVERLAY_DELAY
- else
- set gvRhymeTime to PHOTO_DELAY
- end if
- if ("XYZ" contains gvCurLetter) = 0 then
- set gvCurLetter to "X"
- end if
- set gvfPhotoSFX to 0
- set gvfRealQuit to 0
- set gvTicks to 0
- set gvaPhoto to fArray(mnew, 26)
- initPhotos()
- else
- initMovie()
- updatePhoto(gvCurLetter, "b")
- updateStage()
- set gvTicks to 0
- updateInterface()
- updateStage()
- end if
- set the keyDownScript to "checkKeyForQuit"
- set the exitLock to 1
- end
-
- on stopMovie
- global gvPhotoSprite, gvLabelSprite, gvAlphaHiliteBoxSprite, gvActivity1ButtonSprite, gvActivity2ButtonSprite, gvHiliteLetterSprite, gvChgTrackButtonSprite, gvQuitButtonSprite, gvHelpButtonSprite, gvChgPhotoButton1Sprite, gvChgPhotoButton2Sprite, gvChgPhotoButton3Sprite, gvfRealQuit, gvaPhoto
- set the puppet of sprite gvPhotoSprite to 0
- set the puppet of sprite gvLabelSprite to 0
- set the puppet of sprite gvQuitButtonSprite to 0
- set the puppet of sprite gvAlphaHiliteBoxSprite to 0
- set the puppet of sprite gvChgPhotoButton1Sprite to 0
- set the puppet of sprite gvChgPhotoButton2Sprite to 0
- set the puppet of sprite gvChgPhotoButton3Sprite to 0
- set the puppet of sprite gvActivity1ButtonSprite to 0
- set the puppet of sprite gvActivity2ButtonSprite to 0
- set the puppet of sprite gvChgTrackButtonSprite to 0
- set the puppet of sprite gvHelpButtonSprite to 0
- set the stretch of sprite gvChgPhotoButton1Sprite to 0
- set the stretch of sprite gvChgPhotoButton2Sprite to 0
- set the stretch of sprite gvChgPhotoButton3Sprite to 0
- if gvfRealQuit then
- gvaPhoto(mdispose)
- end if
- set the keyDownScript to EMPTY
- set the mouseDownScript to EMPTY
- set the mouseUpScript to EMPTY
- end
-
- on idle
- checkForTop20()
- set the mouseDownScript to "mouseDownHandler"
- set the mouseUpScript to "mouseUpHandler"
- cursor(0)
- end
-
- on initPhotos
- global gvaPhoto
- repeat with vLetter = 1 to 26
- gvaPhoto(mput, vLetter, 1)
- end repeat
- end
-
- on getLetterAtMarker vMarker
- repeat with vAscii = charToNum("A") to charToNum("Z")
- set vLetter to numToChar(vAscii)
- if marker(vMarker) = label(vLetter) then
- exit repeat
- end if
- end repeat
- return vLetter
- end
-
- on updatePhoto vLetter, vType
- global gvPhotoSprite, gvaPhoto
- set vLetterNum to charToNum(vLetter) - charToNum("A") + 1
- set vWhichPhoto to gvaPhoto(mget, vLetterNum)
- set vCastName to vLetter & "Photo" & vWhichPhoto & vType & ".pic"
- if the number of cast vCastName = -1 then
- set vCastName to vLetter & "Photo" & "1" & vType & ".pic"
- if the number of cast vCastName = -1 then
- set vCastName to vLetter & "Photo" & vWhichPhoto & "b" & ".pic"
- if the number of cast vCastName = -1 then
- set vCastName to vLetter & "Photo" & "1" & "b" & ".pic"
- end if
- end if
- end if
- if the number of cast vCastName <> -1 then
- set the castNum of sprite gvPhotoSprite to the number of cast vCastName
- end if
- end
-
- on updateSwapPhotoButtons
- global gvCurLetter, gvChgPhotoButton1Sprite, gvChgPhotoButton2Sprite, gvChgPhotoButton3Sprite
- repeat with vPhotoNum = 1 to 3
- set vCastName to gvCurLetter & "Photo" & string(vPhotoNum) & "a" & ".pic"
- if the number of cast vCastName = -1 then
- set vCastName to gvCurLetter & "Photo" & string(vPhotoNum) & "b" & ".pic"
- end if
- if vPhotoNum = 1 then
- set the castNum of sprite gvChgPhotoButton1Sprite to the number of cast vCastName
- next repeat
- end if
- if vPhotoNum = 2 then
- set the castNum of sprite gvChgPhotoButton2Sprite to the number of cast vCastName
- next repeat
- end if
- if vPhotoNum = 3 then
- set the castNum of sprite gvChgPhotoButton3Sprite to the number of cast vCastName
- end if
- end repeat
- end
-
- on hideInterface
- global gvAlphaStripSprite, gvToolBarSprite, gvAlphaHiliteBoxSprite, gvActivity1ButtonSprite, gvActivity2ButtonSprite, gvHiliteLetterSprite, gvChgTrackButtonSprite, gvQuitButtonSprite, gvHelpButtonSprite
- set the visible of sprite gvQuitButtonSprite to 0
- set the visible of sprite gvAlphaHiliteBoxSprite to 0
- set the visible of sprite gvActivity1ButtonSprite to 0
- set the visible of sprite gvActivity2ButtonSprite to 0
- set the visible of sprite gvChgTrackButtonSprite to 0
- set the visible of sprite gvAlphaStripSprite to 0
- set the visible of sprite gvToolBarSprite to 0
- set the visible of sprite gvHelpButtonSprite to 0
- set the visible of sprite gvHiliteLetterSprite to 0
- hideSwapPhotoButtons()
- end
-
- on waitCheckMouse vTicks, vfMouse
- if vfMouse then
- wait(vTicks)
- else
- waitNoMouse(vTicks)
- end if
- end
-
- on wait vTicks
- set vTime to the timer
- repeat while the timer < (vTime + vTicks)
- if the mouseDown then
- exit repeat
- end if
- end repeat
- end
-
- on waitNoMouse vTicks
- set vTime to the timer
- repeat while the timer < (vTime + vTicks)
- nothing()
- end repeat
- end
-
- on updateInterface
- global gvAlphaStripSprite, gvToolBarSprite, gvAlphaHiliteBoxSprite, gvActivity1ButtonSprite, gvActivity2ButtonSprite, gvHiliteLetterSprite, gvChgPhotoButton1Sprite, gvChgPhotoButton2Sprite, gvChgPhotoButton3Sprite, gvChgTrackButtonSprite, gvQuitButtonSprite, gvLabelSprite, gvHelpButtonSprite, gvfRhymeTrack, gvCurLetter
- set vLetNum to charToNum(gvCurLetter) - charToNum("A")
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetNum * 21) + 30
- set the visible of sprite gvQuitButtonSprite to 1
- set the visible of sprite gvAlphaHiliteBoxSprite to 1
- set the visible of sprite gvActivity1ButtonSprite to 1
- set the visible of sprite gvActivity2ButtonSprite to 1
- set the visible of sprite gvChgTrackButtonSprite to 1
- set the visible of sprite gvAlphaStripSprite to 1
- set the visible of sprite gvToolBarSprite to 1
- set the visible of sprite gvHelpButtonSprite to 1
- set the visible of sprite gvHiliteLetterSprite to 0
- if gvfRhymeTrack then
- hideSwapPhotoButtons()
- set the visible of sprite gvLabelSprite to 0
- set the castNum of sprite gvChgTrackButtonSprite to the number of cast "PhoButt1.pic"
- set the castNum of sprite gvActivity1ButtonSprite to the number of cast "S&FButt1.pic"
- set the castNum of sprite gvActivity2ButtonSprite to the number of cast "P&PButt1.pic"
- set the locH of sprite gvActivity1ButtonSprite to 380
- set the locH of sprite gvChgTrackButtonSprite to 208
- showCallOuts()
- else
- set the visible of sprite gvChgPhotoButton1Sprite to 1
- set the visible of sprite gvChgPhotoButton2Sprite to 1
- set the visible of sprite gvChgPhotoButton3Sprite to 1
- set the castNum of sprite gvChgTrackButtonSprite to the number of cast "LetButt1.pic"
- set the castNum of sprite gvActivity1ButtonSprite to getPhotoActivityButton()
- set the castNum of sprite gvActivity2ButtonSprite to the number of cast "SwapButt.pic"
- set the locH of sprite gvActivity1ButtonSprite to 327
- set the locH of sprite gvChgTrackButtonSprite to 184
- updateSwapPhotoButtons()
- hideCallOuts()
- end if
- end
-
- on flashRedLetter
- global gvHiliteLetterSprite, gvCurLetter, gvAlphaStripSprite
- if the visible of sprite gvAlphaStripSprite = 1 then
- set the castNum of sprite gvHiliteLetterSprite to the number of cast ("red" & gvCurLetter)
- set the visible of sprite gvHiliteLetterSprite to 1
- updateStage()
- wait(15)
- set the visible of sprite gvHiliteLetterSprite to 0
- updateStage()
- end if
- end
-
- on handleClickInAlphabetStrip vMouseH, vMouseV
- global gvCurLetter, gvAlphabetStrip, gvfRhymeTrack, gvfPhotoSFX, gvAlphaHiliteBoxSprite, DIR_SYM, SFX_EXT
- set vLetter to (vMouseH - 16) / 21
- if (vLetter >= 23) and (vLetter <= 25) then
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetter * 21) + 30
- updateStage()
- repeat while the stillDown
- set vLetter to (the mouseH - 16) / 21
- if vLetter < 23 then
- set vLetter to 23
- end if
- if vLetter > 25 then
- set vLetter to 25
- end if
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetter * 21) + 30
- updateStage()
- end repeat
- set vLetter to numToChar(charToNum("A") + vLetter)
- if vLetter <> gvCurLetter then
- set gvCurLetter to vLetter
- updateInterface()
- flashRedLetter()
- if gvfRhymeTrack then
- set vFileName to "Letter" & gvCurLetter & SFX_EXT
- puppetSound(vFileName)
- end if
- updateStage()
- goToLetter(vLetter)
- if gvfRhymeTrack = 0 then
- set gvfPhotoSFX to 0
- handlePhotoToggle()
- end if
- end if
- end if
- end
-
- on goToNextLetter
- global gvCurLetter, gvfRhymeTrack
- if gvCurLetter = "Z" then
- set vLetter to "X"
- else
- set vLetter to numToChar(charToNum(gvCurLetter) + 1)
- end if
- goToLetter(vLetter)
- end
-
- on goToLetter vLetter
- global gvCurLetter, gvfRhymeTrack, gvTicks, IBM, gvPhotoSprite
- updatePhoto(vLetter, "b")
- set gvCurLetter to vLetter
- if gvfRhymeTrack then
- go(label(vLetter & "STOP"))
- else
- go(label("PHOTO"))
- end if
- end
-
- on playSoundTrack
- global gvfRhymeTrack, gvCurLetter, SFX_EXT
- if gvfRhymeTrack then
- set vCastName to gvCurLetter & "Rhyme1" & SFX_EXT
- puppetSound(vCastName)
- updateStage()
- end if
- end
-
- on doWordCallOuts
- global gvWordSprite1, gvWordSprite2, gvWordSprite3, gvActivity2ButtonSprite, gvCurLetter, gvRhymeTime, gvTicks
- hideCallOuts()
- updateStage()
- set vfMouseDown to 0
- set vCount to 1
- set vWaitTime to 0
- repeat with vSprite = gvWordSprite1 to gvWordSprite3
- if vWaitTime then
- set vCharSprite to getOverlayRhymeSprite()
- if vCharSprite = gvActivity2ButtonSprite then
- set vfMouseDown to animateChar(vCharSprite, 12, 4, vWaitTime, 1)
- else
- set vfMouseDown to animateChar(vCharSprite, 10, 3, vWaitTime, 1)
- end if
- end if
- if vfMouseDown then
- sound stop 1
- exit repeat
- end if
- set the visible of sprite vSprite to 1
- updateStage()
- if vCount = 1 then
- set vWaitTime to 375
- else
- set vWaitTime to 325
- end if
- set vCount to vCount + 1
- end repeat
- showCallOuts()
- updateStage()
- end
-
- on hideSwapPhotoButtons
- global gvChgPhotoButton1Sprite, gvChgPhotoButton2Sprite, gvChgPhotoButton3Sprite
- set the visible of sprite gvChgPhotoButton1Sprite to 0
- set the visible of sprite gvChgPhotoButton2Sprite to 0
- set the visible of sprite gvChgPhotoButton3Sprite to 0
- set the castNum of sprite gvChgPhotoButton1Sprite to the number of cast "HideSprite"
- set the castNum of sprite gvChgPhotoButton2Sprite to the number of cast "HideSprite"
- set the castNum of sprite gvChgPhotoButton3Sprite to the number of cast "HideSprite"
- end
-
- on hideCallOuts
- global gvWordSprite1, gvWordSprite2, gvWordSprite3
- set the visible of sprite gvWordSprite1 to 0
- set the visible of sprite gvWordSprite2 to 0
- set the visible of sprite gvWordSprite3 to 0
- end
-
- on showCallOuts
- global gvWordSprite1, gvWordSprite2, gvWordSprite3
- set the visible of sprite gvWordSprite1 to 1
- set the visible of sprite gvWordSprite2 to 1
- set the visible of sprite gvWordSprite3 to 1
- end
-
- on handlePhotoToggle
- global gvfRhymeTrack, gvfPhotoSFX, gvCurLetter, gvaPhoto, gvLabelSprite, SFX_EXT, DIR_SYM, gvActivity1ButtonSprite
- set vfMouseDown to 0
- if gvfRhymeTrack = 0 then
- set vLetterNum to charToNum(gvCurLetter) - charToNum("A") + 1
- set vWhichPhoto to gvaPhoto(mget, vLetterNum)
- if gvfPhotoSFX then
- set vFileName to gvCurLetter & "Sound" & string(vWhichPhoto) & SFX_EXT
- puppetSound(vFileName)
- updateStage()
- set gvfPhotoSFX to 0
- else
- set the visible of sprite gvLabelSprite to 1
- set the stretch of sprite gvLabelSprite to 0
- set vCastName to gvCurLetter & ".pic"
- set the castNum of sprite gvLabelSprite to the number of cast vCastName
- updateStage()
- set vFileName to gvCurLetter & string(vWhichPhoto) & SFX_EXT
- puppetSound(vFileName)
- updateStage()
- if the name of cast the castNum of sprite gvActivity1ButtonSprite contains "FFFButt" then
- set vfMouseDown to animateChar(gvActivity1ButtonSprite, 10, 4, 10, 1)
- else
- set vfMouseDown to animateChar(gvActivity1ButtonSprite, 10, 3, 10, 1)
- end if
- if vfMouseDown then
- sound stop 1
- else
- set vTime to the timer + 20
- if gvCurLetter = "X" then
- set vCastName to gvCurLetter & "1" & ".pic"
- else
- set vCastName to gvCurLetter & string(vWhichPhoto) & ".pic"
- end if
- preLoadCast(vCastName)
- repeat while the timer < vTime
- if the mouseDown then
- set vfMouseDown to 1
- exit repeat
- end if
- end repeat
- if vfMouseDown = 0 then
- set the castNum of sprite gvLabelSprite to the number of cast vCastName
- set vTime to the timer + 60
- if the name of cast the castNum of sprite gvActivity1ButtonSprite contains "FFFButt" then
- set vfMouseDown to animateChar(gvActivity1ButtonSprite, 10, 4, 0, 1)
- else
- set vfMouseDown to animateChar(gvActivity1ButtonSprite, 10, 3, 0, 1)
- end if
- repeat while the timer < vTime
- if the mouseDown or vfMouseDown then
- set vfMouseDown to 1
- exit repeat
- end if
- end repeat
- end if
- end if
- set the visible of sprite gvLabelSprite to 0
- updateStage()
- set gvfPhotoSFX to 1
- end if
- end if
- end
-
- on doTransition
- global gvOverlaySprite, gvMaskSprite, gvLetterMaskSprite, gvRhymeTime, gvfRhymeTrack, gvCurLetter, OVERLAY_DELAY, PHOTO_DELAY
- if gvfRhymeTrack then
- set gvfRhymeTrack to 0
- set the visible of sprite gvOverlaySprite to 0
- set the visible of sprite gvMaskSprite to 0
- set the visible of sprite gvLetterMaskSprite to 0
- updateInterface()
- puppetTransition(23, 1, 20, 1)
- go(label("PHOTO"))
- set gvRhymeTime to PHOTO_DELAY
- else
- set gvfRhymeTrack to 1
- set the visible of sprite gvOverlaySprite to 1
- set the visible of sprite gvMaskSprite to 1
- set the visible of sprite gvLetterMaskSprite to 1
- updateInterface()
- puppetTransition(23, 1, 20, 1)
- go(label(gvCurLetter & "STOP"))
- set gvRhymeTime to OVERLAY_DELAY
- end if
- end
-
- factory fArray
-